package com.binance.connector.client.utils;

import lombok.Getter;
import okhttp3.OkHttpClient;

import java.net.InetSocketAddress;
import java.net.Proxy;

public final class HttpClientSingleton {
    @Getter
    private static final OkHttpClient httpClient ;



    static {
        Proxy proxy = new Proxy(Proxy.Type.HTTP,
                new InetSocketAddress("127.0.0.1", 62174));
        // 创建OKHttpClient的Builder
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        // 设置代理
        builder.proxy(proxy);

        // 构建OkHttpClient
        httpClient = builder.build();
    }
    private HttpClientSingleton() {
    }

}
